package com.cpic.rxjava;

import android.util.Log;

public class ObservableMap<T, R> extends Obsersable<R> {
    Obsersable<T> source;

    Function<T,R> function;


    public ObservableMap(Obsersable<T> source, Function<T, R> function) {
        this.source = source;
        this.function = function;
        Log.e("ObservableMap","id = "+this.toString());
    }


    @Override
    public void subcribeObserverActual(Observer<R> observer) {
        Log.e("ObservableMap",this.toString()+"   "+"subcribeObserverActual");
        source.subcribeObserver(new MapObserver<T,R>(function, observer));
    }

}
